package com.jxc.model.po;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 盘点单明细
 * 
 * @author Tino
 * 
 */
@Entity
@Table(name = "KCGL_CHECKLIST_ITEM")
public class ChecklistItem extends IdEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3311246569174610815L;
	/**
	 * 商品
	 * 
	 */
	private Goods goods;
	/**
	 * 盘点库存
	 * 
	 */
	private Long checkAmount;
	/**
	 * 是否盘点完
	 * 
	 */
	private Boolean isChecked;
	/**
	 * 盘点时间
	 */
	private Date checkDate;
	/**
	 * 盘点单
	 * 
	 */
	private Checklist checklist;
	/**
	 * 备注
	 * 
	 */
	private Long initAmount;
	private Long orderTotal;
	private Long orderReturnTotal;
	private Long saleTotal;
	private Long saleReturnTotal;
	private Long damageTotal;
	private Long transferTotal;
	private Long repertoryTotal;
	private Long beforeCheck;
	private String remark;



	@Column(name = "BEFORE_CHECK")
	public Long getBeforeCheck() {
		return beforeCheck;
	}

	public void setBeforeCheck(Long beforeCheck) {
		this.beforeCheck = beforeCheck;
	}

	@Column(name = "ORDER_TOTAL")
	public Long getOrderTotal() {
		return orderTotal;
	}

	@Column(name = "INIT_AMOUNT")
	public Long getInitAmount() {
		return initAmount;
	}

	public void setInitAmount(Long initAmount) {
		this.initAmount = initAmount;
	}

	public void setOrderTotal(Long orderTotal) {
		this.orderTotal = orderTotal;
	}
	@Column(name = "ORDERRETURN_TOTAL")
	public Long getOrderReturnTotal() {
		return orderReturnTotal;
	}

	public void setOrderReturnTotal(Long orderReturnTotal) {
		this.orderReturnTotal = orderReturnTotal;
	}
	@Column(name = "SALE_TOTAL")
	public Long getSaleTotal() {
		return saleTotal;
	}

	public void setSaleTotal(Long saleTotal) {
		this.saleTotal = saleTotal;
	}
	@Column(name = "SALERETURN_TOTAL")
	public Long getSaleReturnTotal() {
		return saleReturnTotal;
	}

	public void setSaleReturnTotal(Long saleReturnTotal) {
		this.saleReturnTotal = saleReturnTotal;
	}
	@Column(name = "DAMAGE_TOTAL")
	public Long getDamageTotal() {
		return damageTotal;
	}

	public void setDamageTotal(Long damageTotal) {
		this.damageTotal = damageTotal;
	}
	@Column(name = "TRANSFER_TOTAL")
	public Long getTransferTotal() {
		return transferTotal;
	}

	public void setTransferTotal(Long transferTotal) {
		this.transferTotal = transferTotal;
	}
	@Column(name = "REPERTORY_TOTAL")
	public Long getRepertoryTotal() {
		return repertoryTotal;
	}

	public void setRepertoryTotal(Long repertoryTotal) {
		this.repertoryTotal = repertoryTotal;
	}

	public ChecklistItem() {
		super();
	}

	public ChecklistItem(Long id) {
		super(id);
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_ID")
	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}


	@Column(name = "IS_CHECKED")
	public Boolean getIsChecked() {
		return isChecked;
	}

	@Column(name = "CHECK_AMOUNT", length = 10)
	public Long getCheckAmount() {
		return checkAmount;
	}

	public void setCheckAmount(Long checkAmount) {
		this.checkAmount = checkAmount;
	}

	public void setIsChecked(Boolean isChecked) {
		this.isChecked = isChecked;
	}

	@Column(name = "CHECK_DATE")
	public Date getCheckDate() {
		return checkDate;
	}

	public void setCheckDate(Date checkDate) {
		this.checkDate = checkDate;
	}

	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
	@JoinColumn(name = "CHECKLIST_ID")
	public Checklist getChecklist() {
		return checklist;
	}

	public void setChecklist(Checklist checklist) {
		this.checklist = checklist;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
